<?php
$params = array_merge(
    require(CORE . '/common/config/params.php'),
    require(CORE . '/common/config/params-local.php'),
    require(__DIR__ . '/params.php'),
    require(__DIR__ . '/params-local.php')
);
return [
    'id' => 'app-front',                                // 模块id
    'basePath' => dirname(__DIR__),
    'controllerNamespace' => 'front\controllers',       // 命名空间
    'bootstrap' => ['log'],
    'defaultRoute'=>'web/default/home',
    'modules' => [
        'debug' => [
            'class'      => 'yii\debug\Module',
            'allowedIPs' => ['*'],
        ],
        'web' => [

            'class' => 'front\modules\web\web',

        ],
        'app' => [

            'class' => 'front\modules\app\web',

        ],
    ],
    'components' => [
        'user' => [
            'identityClass' => 'users\models\User',
            'enableAutoLogin' => true,
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning', 'info'],
                ],
            ],
        ],
        'errorHandler' => [
            'errorAction' => 'web/site/error',
        ],
    ],
    'params' => $params,
];
